﻿
@{
    ViewBag.Title = "Add";
    Layout = "~/Areas/admin/Views/Shared/_Layout.cshtml";
    List<One_day.Models.T_Shop_Category> cate =(List<One_day.Models.T_Shop_Category>) ViewBag.cate;
}

<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">增加商品</h1>
        </div>
    </div>
    <div class="row">
        <div style="padding:20px;">
            <form action="/admin/product/AddSave" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="ProductName">ProductName</label>
                    <input type="text" class="form-control" id="ProductName" name="ProductName" placeholder="商品名称">
                </div>
                <div class="form-group">
                    <label for="Price">Price</label>
                    <input type="text" class="form-control" id="Price" name="Price" placeholder="商品价钱">
                </div>
                <div class="form-group">
                    <label for="SelledAmount">SelledAmount</label>
                    <input type="text" class="form-control" id="SelledAmount" name="SelledAmount" placeholder="已卖商品数量">
                </div>
                <div class="form-group">
                    <label for="StockAmount">StockAmount</label>
                    <input type="text" class="form-control" id="StockAmount" name="StockAmount" placeholder="商品剩余库存">
                </div>
                <div class="form-group">
                    <label for="CategoryId">CategoryId</label>
                    <select name="CategoryId" id="CategoryId">
                        @{ 
                            foreach(var item in cate)
                            {
                                <option value="@item.Id">@item.CatagoryName</option>
                            }
                        }
                    </select>
                </div>
                <div class="form-group">
                    <label for="PicUrl">PicUrl</label>
                    <input type="file" class="form-control" id="PicUrl" name="PicUrl" placeholder="商品图片">
                </div>
                <button type="submit" class="btn btn-default">提交</button>
            </form>
        </div>
    </div>
</div>

